/*
 * @Author: XuYang 
 * @Date: 2021-05-17 16:44:14 
 * @Last Modified by: XuYang
 * @Last Modified time: 2021-05-17 17:15:30
 */

import { Column,  Index, PrimaryGeneratedColumn } from "typeorm";
import { EntityModel } from '@midwayjs/orm';

@EntityModel('role')
export class Role{
    @PrimaryGeneratedColumn()
    id: string;
    
    @Column({ comment: '创建时间' })
    createTime: string;

    @Column({ comment: '更新时间' })
    updateTime: string;

    @Index({ unique: true })
    @Column({ comment: '名称' })
    name: string;

    @Index({ unique: true })
    @Column({ comment: '角色标签', nullable: true, length: 50 })
    label: string;

    @Column({ comment: '备注', nullable: true })
    remark: string;

    @Column({ comment: '数据权限是否关联上下级', default: 1 })
    relevance: number;
}

